#ifndef SEQIOT_SYSINFO_H
#define SEQIOT_SYSINFO_H

#include <stdio.h>

typedef struct {
    char id[32];
    char name[96];
    char cmd[256];
    double _value;
} sys_info_t;

sys_info_t *sys_info_new();

void sys_info_free(sys_info_t *ptr);

void read_row_sys_info(sqlite3_stmt *stmt, sys_info_t *rs);

int read_stmt_sys_infos(sqlite3 *db, vector_t *infos);

int sys_info_exec_string(const char *cmd, char *buf, int size);

int sys_info_exec_double(const char *cmd, double *value);

#endif //SEQIOT_SYSINFO_H
